<style type="text/css">
  ul.mycon li{ width:65px;}
  #t_channel em{cursor:pointer;}
</style>
<div id="send">
<div class="sendBox">
<div class="sendTitle">
<div id="send_follow" class="mleft">
<!--{if $this->Get[mod] == 'member'}-->
<!--{eval $content = '#新人报到# 我是'.$this->Config[site_name].'新加入的成员@'.MEMBER_NICKNAME.' ，欢迎大家来关注我！';}-->
所有关注我的人将看到我分享的信息
<!--{elseif $defaust_value}-->
{$defaust_value}
<!--{else}-->
{$content_ostr}
<!--{/if}-->
</div>

<!--{if $this->Channel_enable && $this->Config['channel_enable'] && !in_array($type,array('design','btn_wyfx','answer','ask'))}-->
<div id="tochannel" style="display:none;">
		<script type="text/javascript">
		function modifySync(obj){
			var urls='{$this->Config[site_url]}/ajax.php?mod=misc&code=setsync';
			$.getJSON(urls,{setting:$(obj).attr('data-setting'),type:$(obj).attr('data-type')},function(r){
				var src = $(obj).attr('src');
				$(obj).attr('data-setting',r.retval);
				if(r.retval){					
					$(obj).attr('src',src.replace('icon_on.gif','icon_off.gif'));
				}else{
					$(obj).attr('src',src.replace('icon_off.gif','icon_on.gif'));
				}
			});
		}
		</script>
		<script type="text/javascript">
		$(document).ready(function(){
		$("#p_channel,#t_pb").bind('mouseover', function(){$('#p_channel').show();$('#t_pb').addClass('hover');});
		$("#p_channel,#t_pb").bind('mouseout', function(){$('#p_channel').hide();$('#t_pb').removeClass('hover');});
		});
		function c_hide(){$('#p_channel').hide();$('#t_pb').removeClass('hover');}
		function c_cut(){$('#t_channel').html('');$('#mapp_item{$h_key}').val('{$this->item}');$('#mapp_item_id{$h_key}').val('{$this->item_id}');$('#cverify').val('{$this->Config[verify]}');}
		function c_int(n,s,c){$('#p_channel').hide();$('#t_pb').removeClass('hover');$('#t_channel').html(s+'<em onclick="c_cut();">×</em>');$('#mapp_item{$h_key}').val('channel');$('#mapp_item_id{$h_key}').val(n);$('#cverify').val(c);}
		function c_no(){show_message('您没有权限发'+__N_WEIBO__+'到该频道',2,'提示','msgBox','msg_alert');return false;}
		</script>
		<div class="box_4_channel" {if $_GET['type']=='nedu'}style="display:none;"{/if}>
		<span class="select" id="t_pb">发布到频道</span>
        <span class="channel" id="t_channel" style=" float:none; display:inline; margin-left:5px; font-weight:500;">{$post_channel_name}</span>
		<div class="channels" id="p_channel">
		<!--<span class="close" onclick="c_hide();">×</span>-->
		<!--{if $this->Channels}-->
		<!--{loop $this->Channels $val}-->
		<dl>
		<dt>
		<!--{if $val[ok]}-->
		<a onclick="c_int({$val['ch_id']},'{$val['ch_name']}',{$val['ck']});">{$val['ch_name']}</a>
		<!--{else}-->
		<a onclick="c_no();" class="hui" title="您所在的用户组没有权限发{$this->Config[changeword][n_weibo]}到该频道">{$val['ch_name']}</a>
		<!--{/if}-->
		</dt>
		<dd>
		<!--{if $val['child']}-->
		<!--{loop $val['child'] $v}-->
		<!--{if $v[ok]}-->
		<a onclick="c_int({$v['ch_id']},'{$v['ch_name']}',{$v['ck']});">{$v['ch_name']}</a>
		<!--{else}-->
		<a onclick="c_no();" class="hui" title="您所在的用户组没有权限发{$this->Config[changeword][n_weibo]}到该频道">{$v['ch_name']}</a>
		<!--{/if}-->
		<!--{/loop}-->
		<!--{else}-->
		&nbsp;
		<!--{/if}-->
		</dd>
		</dl>
		<!--{/loop}-->
		<!--{else}-->
		<p>没有频道可供发布</p>
		<!--{/if}-->
		</div>
		</div>
</div>
<!--{/if}-->




<ul class="mycon">
<!--{if $this->Config[topic_input_length]>0}-->
<li>还可以输入</li><li style="width:auto"><span id="wordCheck{$h_key}" style='font-size:20px;'>{conf topic_input_length}</span></li><li style="width:14px;">字</li>
<!--{/if}-->
</ul>
</div>

<div class="sendInput" style="display:block">
<!--{eval $content = $content ? $content : $this->Config[today_topic];$i_already_value = $content_dstr ? $content_dstr : $content;$this->totid = $this->totid ? $this->totid : 0;}-->
<!--{eval $channel_check = isset($post_channel_check) ? $post_channel_check : ($this->Config[verify] ? 1 : 0);}-->
<!--{eval $p_item = isset($post_item_name) ? $post_item_name : $this->item;}-->
<!--{eval $p_item_id = isset($post_item_id) ? $post_item_id : $this->item_id;}-->
<script type="text/javascript">
var __I_ALREADY_VALUE__ = '{$i_already_value}';
var __ALERT__='{$this->Config[verify_alert]}';
var __CONTENTID__ = 'i_already{$h_key}';
</script>
<textarea name="content" id="i_already{$h_key}"  onkeyup="javascript:checkWord('{conf topic_input_length}','i_already{$h_key}','wordCheck{$h_key}')" onkeydown="ctrlEnter(event, 'publishSubmit{$h_key}')">{$i_already_value}</textarea>
<!--{eval $_get_type=str_safe($this->Get[type]);}-->
<input name="topic_type" type="hidden" id="topic_type{$h_key}" value="{$_get_type}" />
<input name="totid" type="hidden" id="totid{$h_key}" value="{$this->totid}" />
<input name="touid" type="hidden" id="touid{$h_key}" value="{$this->touid}" />
<!--应用 Begin-->
<input name="item" type="hidden" id="mapp_item{$h_key}" value="{$p_item}" />
<input name="item_id" type="hidden" id="mapp_item_id{$h_key}" value="{$p_item_id}" />
<input name="xiami_id" type="hidden" id="xiami_id" value="" />
<input type="hidden" id="cverify" name="cverify" value="{$channel_check}">
<!--应用 End-->
<!--{eval if($this->MemberHandler->HasPermission('uploadattach','attach')!=false) $can_allow_attach = 1; else $can_allow_attach = 0 }-->
</div>
<div class="sendInsert">
<!--{if !($type == 'design' || $type == 'btn_wyfx')}-->
	<script type="text/javascript">
	 $(document).ready(function() {
	 
	 //签到
	 $(".menu_hqs_c").click(function(){
	 $(".menu_hqs").show();
	 $(".menu_htb").hide();
	 $(".menu_spb").hide();
	 $(".menu_tqb").hide();
	 $(".menu_hpb").hide();
	 $(".menu_fjb").hide();
	 $('#showface{$h_key}').hide();
	 $('.menu_vsb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_hdb").hide();
	 $(".menu_cwb").hide();	
	 $(".menu_xb").hide();
	 $(".menu_q_b").hide();
	 $(".menu_c_b").hide();
	 $(".menu_mc_b").hide();
	 $(".pull").hide();
	 $(".pull_down").hide();
	 $(".menu_m").css({"background-position":"2px 5px"});


	 });
	 $(".menu_hqs_c1").click(function(){$(".menu_hqs").hide();});
	 
	 //表情
	 $(".menu_bqb_c").click(function(){
	 $("#showface{$h_key}").show();
	 $(".menu_tqb").hide();
	 $(".menu_fjb").hide();
	 $(".menu_spb").hide();
	 $('.menu_htb').hide();
	 $(".menu_hpb").hide();
	 $('.menu_vsb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_hdb").hide();
	 $(".menu_cwb").hide();
	 $(".menu_hqs").hide();
	 $(".menu_xb").hide();
	 $(".menu_q_b").hide();
	 $(".menu_c_b").hide();
	 $(".menu_mc_b").hide();
	 $(".pull").hide();
	 $(".pull_down").hide();
	 $(".menu_m").css({"background-position":"2px 5px"});



	 });
	 $('#showface{$h_key}').click(function(){return false;});
	 
	 //图片 
	 $(".menu_tqb_c").click(function(){
	 $(".menu_tqb").show();
	 $(".menu_fjb").hide();
	 $(".menu_spb").hide();
	 $('#showface{$h_key}').hide();
	 $('.menu_htb').hide();
	 $(".menu_hpb").hide();
	 $('.menu_vsb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_hdb").hide();
	 $(".menu_cwb").hide();
	 $(".menu_hqs").hide();
	 $(".menu_xb").hide();
	 $(".menu_q_b").hide();
	 $(".menu_c_b").hide();
	 $(".menu_mc_b").hide();
	 $(".pull").hide();
	 $(".pull_down").hide();
	 $(".menu_m").css({"background-position":"2px 5px"});

	 });
	 $('#pubImg').click(function(){$("#publisher_file").style.posLeft=event.x-offsetWidth/2;$("#publisher_file").style.posTop=event.y-offsetHeight/2;});
	 $(".menu_tqb_c1").click(function(){$(".menu_tqb").hide();});
	 $("#publishSubmit").click(function(){$(".menu_tqb").hide();});
	 
	 //本地上传
	 $(".up_title1").click(function(){
	 $(".up_content1").show();
	 $(".up_content2").hide();
	 $(".up_content3").hide();
	 $(".up_title1").css("background","#ddd");
	 $(".up_title2").css("background","none");
	 $(".up_title3").css("background","none");
	 $('#showface{$h_key}').hide();
	 });
	 
	 //网络图片
	 $(".up_title2").click(function(){
	 $(".up_content2").show();
	 $(".up_content1").hide();
	 $(".up_content3").hide();
	 $(".up_title2").css("background","#ddd");
	 $(".up_title1").css("background","none");
	 $(".up_title3").css("background","none");
	 $('#showface{$h_key}').hide();
	 });
	 
	 //图片搜索
	 $(".up_title3").click(function(){
	 $(".up_content3").show();
	 $(".up_content1").hide();
	 $(".up_content2").hide();
	 $(".up_title3").css("background","#ddd");
	 $(".up_title1").css("background","none");
	 $(".up_title2").css("background","none");
	 $('#showface{$h_key}').hide();
	 });

	 //朋友
	 $(".menu_hpb_c").click(function(){
	 $(".menu_spb").hide();
	 $(".menu_tqb").hide();
	 $(".menu_hpb").show();
	 $(".menu_fjb").hide();
	 $('#showface{$h_key}').hide();
	 $('.menu_htb').hide();
	 $('.menu_vsb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_hdb").hide();
	 $(".menu_cwb").hide();
	 $(".menu_hqs").hide();
	 $(".menu_xb").hide();
	 $(".menu_q_b").hide();
	 $(".menu_c_b").hide();
	 $(".menu_mc_b").hide();
	 $(".pull").hide();
	 $(".pull_down").hide();
	 $(".menu_m").css({"background-position":"2px 5px"});
	 });
	 $(".menu_hpb_c1").click(function(){$(".menu_hpb").hide();});

	 //视频
	 $(".menu_spb_c").click(function(){
	 $(".menu_spb").show();
	 $(".menu_tqb").hide();
	 $(".menu_hpb").hide();
	 $(".menu_fjb").hide();
	 $('#showface{$h_key}').hide();
	 $('.menu_htb').hide();
	 $('.menu_vsb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_hdb").hide();
	 $(".menu_cwb").hide();
	 $(".menu_hqs").hide();
	 $(".menu_xb").hide();
	 $(".menu_q_b").hide();
	 $(".menu_c_b").hide();
	 $(".menu_mc_b").hide();
	 $(".pull").hide();
	 $(".pull_down").hide();
	 $(".menu_m").css({"background-position":"2px 5px"});
	 });
	 $(".menu_spb_c1").click(function(){$(".menu_spb").hide();});
	 
	 //音乐
	 $(".menu_xb_c").click(function(){
	 getClassPost();
	 $(".menu_xb").show();
	 $(".menu_wqb").hide();
	 $(".menu_tqb").hide();
	 $(".menu_hpb").hide();
	 $(".menu_spb").hide();
	 $('#showface').hide();
	 $('.menu_htb').hide();
	 $(".menu_vsb").hide();
	 $(".menu_hqs").hide();
	 $(".menu_q_b").hide();
	 $(".menu_c_b").hide();
	 $(".menu_mc_b").hide();
	 $(".pull").hide();
	 $(".pull_down").hide();
	 $(".menu_m").css({"background-position":"2px 5px"});
	 });
	 $(".menu_music_c1").click(function(){$(".menu_xb").hide();});
	 
	   //A格式
	 $(".menu_a_c").click(function(){
		 $(".pull").show();
		 $(".pull_down").hide();
		 $(".menu_m").css({"background-position":"2px 5px"});
		 $(".menu_wqb").hide();
		 $(".menu_tqb").hide();
		 $(".menu_hpb").hide();
		 $(".menu_spb").hide();
		 $('#showface').hide();
		 $('.menu_htb').hide();
		 $(".menu_vsb").hide();
		 $(".menu_hdb").hide();
		 $(".menu_cwb").hide();
		 $(".menu_hqs").hide();
		 $(".menu_fjb").hide();
		 $(".menu_xb").hide();
		 $(".menu_q_b").hide();
	     $(".menu_c_b").hide();
	     $(".menu_mc_b").hide();
	 		 
	 });
	 $(".menu_a_c1").click(function(){$(".pull").hide();
		// $(".menu_a").css({"background-position":"2px 5px"});
		
	 });
	 
	 //颜色
	 $(".menu_hcb_c").click(function(){
	 $(".menu_c_b").show();
	 $(".menu_vsb").hide();
	 $(".menu_tqb").hide();
	 $(".menu_hpb").hide();
	 $(".menu_fjb").hide();
	 $(".menu_spb").hide();
	 $('#showface{$h_key}').hide();
	 $('.menu_htb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_cwb").hide();
	 $(".menu_hqs").hide();
	 $(".menu_xb").hide();
	 $(".menu_q_b").hide();
	 $(".menu_mc_b").hide();
	 });
	 $(".menu_color_c1").click(function(){$(".menu_c_b").hide();});
     
	 //引用
	 $(".menu_hyb_c").click(function(){
	 $(".menu_q_b").show();
	 $(".menu_vsb").hide();
	 $(".menu_tqb").hide();
	 $(".menu_hpb").hide();
	 $(".menu_fjb").hide();
	 $(".menu_spb").hide();
	 $('#showface{$h_key}').hide();
	 $('.menu_htb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_cwb").hide();
	 $(".menu_hqs").hide();
	 $(".menu_xb").hide();
	 $(".menu_c_b").hide();
	 $(".menu_mc_b").hide();
	 });
	 $(".menu_quote_c1").click(function(){$(".menu_q_b").hide();});
     
	 //代码
	 $(".menu_hmb_c").click(function(){
	 $(".menu_mc_b").show();
	 $(".menu_vsb").hide();
	 $(".menu_tqb").hide();
	 $(".menu_hpb").hide();
	 $(".menu_fjb").hide();
	 $(".menu_spb").hide();
	 $('#showface{$h_key}').hide();
	 $('.menu_htb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_cwb").hide();
	 $(".menu_hqs").hide();
	 $(".menu_xb").hide();
	 $(".menu_q_b").hide();
	 $(".menu_c_b").hide();
	 });
	 $(".menu_code_c1").click(function(){$(".menu_mc_b").hide();});

	 //更多
	 $(".menu_m_c").click(function(){
         $(".menu_m").css({"background-position":"2px -16px","padding-left":"15px"});
         $(".pull_down").show();
		 $(".pull").hide();
		 $(".menu_wqb").hide();
		 $(".menu_tqb").hide();
		 $(".menu_hpb").hide();
		 $(".menu_spb").hide();
		 $('#showface').hide();
		 $('.menu_htb').hide();
		 $(".menu_vsb").hide();
		 $(".menu_hdb").hide();
		 $(".menu_cwb").hide();
		 $(".menu_hqs").hide();
		 $(".menu_fjb").hide();
		 $(".menu_xb").hide();
		 $(".menu_q_b").hide();
	     $(".menu_c_b").hide();
	     $(".menu_mc_b").hide();

	 });
	 $(".menu_m_c1").click(function(){$(".pull_down").hide();
		 $(".menu_m").css({"background-position":"2px 5px"});
	 });
	 
	  //附件 
	 $(".menu_fjb_c").click(function(){
	 <!--{if $can_allow_attach}-->
	 $(".menu_fjb").show();
	 $(".menu_tqb").hide();
	 $(".menu_hpb").hide();
	 $(".menu_spb").hide();
	 $('#showface{$h_key}').hide();
	 $('.menu_htb').hide();
	 $('.menu_vsb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_hdb").hide();
	 $(".menu_cwb").hide();
	 $(".menu_hqs").hide();
	});
	 $('#pubAttach').click(function(){$("#publisher_file_attach").style.posLeft=event.x-offsetWidth/2;$("#publisher_file_attach").style.posTop=event.y-offsetHeight/2;});
	 $(".menu_fjb_c1").click(function(){$(".menu_fjb").hide();});
	 $("#publishSubmit").click(function(){$(".menu_fjb").hide();
	 <!--{else}-->
	 MessageBox('warning', '您没有上传附件的操作权限！');
	 <!--{/if}-->
	 });
	 
	 //话题
	 $(".menu_htb_c").click(function(){
	 $(".menu_htb").show();
	 $(".menu_spb").hide();
	 $(".menu_tqb").hide();
	 $(".menu_hpb").hide();
	 $(".menu_fjb").hide();
	 $('#showface{$h_key}').hide();
	 $('.menu_vsb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_hdb").hide();
	 $(".menu_cwb").hide();
	 $(".menu_hqs").hide();
	 });
	 $('.menu_htb').click(function(){return false;});
	 
	 $(".menu_htb_c1").click(function(){$(".menu_htb").hide();});
	 $(".menu_htb_c2").click(function(){$(".menu_htb").hide();});
	 
	 //投票
	 $(".menu_vsb_c").click(function(){
	 getVoteAvtivityFromIndex('vote_publish', 'con_vote_content_1');
	 $(".menu_vsb").show();
	 $(".menu_tqb").hide();
	 $(".menu_hpb").hide();
	 $(".menu_fjb").hide();
	 $(".menu_spb").hide();
	 $('#showface{$h_key}').hide();
	 $('.menu_htb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_hdb").hide();
	 $(".menu_cwb").hide();
	 $(".menu_hqs").hide();
	 });
	 $(".menu_vsb_c1").click(function(){$(".menu_vsb").hide();});
	 
	 //活动
	 $(".menu_hdb_c").click(function(){
	 getEventPost();
	 $(".menu_hdb").show();
	 $(".menu_vsb").hide();
	 $(".menu_tqb").hide();
	 $(".menu_hpb").hide();
	 $(".menu_fjb").hide();
	 $(".menu_spb").hide();
	 $('#showface{$h_key}').hide();
	 $('.menu_htb').hide();
	 $(".menu_wqb").hide();
	 $(".menu_cwb").hide();
	 $(".menu_hqs").hide();
	 });
    
	 $(".menu_hdb_c1").click(function(){$(".menu_hdb").hide();});
	 
	 //微群
	 $(".menu_wqb_c").click(function(){
		 getMyQun();
		 $(".menu_wqb").show();
		 $(".menu_tqb").hide();
		 $(".menu_hpb").hide();
		 $(".menu_fjb").hide();
		 $(".menu_spb").hide();
		 $('#showface{$h_key}').hide();
		 $('.menu_htb').hide();
		 $(".menu_vsb").hide();
		 $(".menu_hdb").hide();
		 $(".menu_cwb").hide();
		 $(".menu_hqs").hide();
	 });
	 $(".menu_wqb_c1").click(function(){$(".menu_wqb").hide();});
	 
	  
	 //同步
	 $(".box_4_open_span").click(function(){
		 $(".box_4_open_Box").show();
		 $(".menu_wqb").hide();
		 $(".menu_tqb").hide();
		 $(".menu_hpb").hide();
		 $(".menu_spb").hide();
		 $('#showface').hide();
		 $('.menu_htb').hide();
		 $(".menu_vsb").hide();
		 $(".menu_hdb").hide();
		 $(".menu_cwb").hide();
		 $(".menu_hqs").hide();
		 $(".menu_fjb").hide();
	 });
	 //同步
	 $(".menu_m").click(function(){
		 $(".menu_m").show();
	 });
	 $(".box_4_open_span_c1").click(function(){$(".box_4_open_Box").hide();});
	 //$(".box_4_open_Box").mouseout(function(){$(".box_4_open_Box").hide();});
	 
});

//-----------------------------------
function setTab(name,cursel,n){
	for(i=1;i<=n;i++){
        var menu=document.getElementById(name+i);
        var con=document.getElementById("con_"+name+"_"+i);
        menu.className=i==cursel?"vhover":"";
        con.style.display=i==cursel?"block":"none";
        if(i==cursel){
            con.style.display="block"
        } else {
            $("#con_"+name+"_"+i+" div").remove();
        }
    }
}

function setTab1(name,cursel,n){
	for(i=1;i<=n;i++){
	var menu=document.getElementById(name+i);
	var con=document.getElementById("con_"+name+"_"+i);
	menu.className=i==cursel?"vhover":"";
	con.style.display=i==cursel?"block":"none";
}
}

function setTab2(name,cursel,n){
	for(i=1;i<=n;i++){
	var menu2=document.getElementById(name+i);
	var con2=document.getElementById("con2_"+name+"_"+i);
	menu2.className=i==cursel?"vhover2":"";
	con2.style.display=i==cursel?"block":"none";
}
}


</script>
    <div class="mleft">
    
	<!--{if $this->Config[sign][sign_enable]}-->
	<div class="menu">
	  <div class="menu_hq" id="sign_{MEMBER_ID}"><span onclick="getSignTag({MEMBER_ID});return false;" class="menu_hqs_c" title="选择签到类别">签到</span>
		<div class="menu_hqs">
          <span class="arrow-up"></span>   
          <span class="arrow-up-in"></span>
          <div class="menu_checkin">
		  <div id="sign_tag_{MEMBER_ID}"></div>
          <sub class="menu_hqs_c1"></sub>
          </div>
		</div>
	  </div>
	</div>
	<!--{/if}-->

	<!--{if $this->Config['face_enable']}-->
	<div class="menu">
	   <div class="menu_bq" id="editface" ><b class="menu_bqb_c"><a href="javascript:void(0);" title="点击插入表情，让内容更生动" onclick="topic_face('showface{$h_key}','i_already{$h_key}','topic_face');return false;" style="color:#666;">表情</a></b>    
       <div id="showface{$h_key}" class="showface"></div>     
	   </div>
    </div>
	<!--{/if}-->

	<!--{if $this->Config['image_enable']}-->
	<!-- 图片区块 开始 -->
	<!-- JS引用 开始 -->	   
	<!--{eval $image_uploadify_topic = array();}-->
	<!--{eval $image_uploadify_from = 'topic_publish';}-->
	<!--{eval $image_uploadify_only_js = 1;}-->
	{template "image_uploadify.inc"}
	<!-- JS引用 结束 -->
	<div class="menu">
	   <div class="menu_tq" ><b class="menu_tqb_c" title="可实现图文混排">图片</b>
	      <div class="menu_tqb">       
          <span class="arrow-up"></span>   
          <span class="arrow-up-in"></span>
			<i class="menu_tqb_c1"><img src="images/imgdel.gif" title="关闭" /></i>			
            <div class="menu_tqbox">
                <p class="stitle">
                <b class="up_title1" style="background:#ddd;"> 本地上传</b>|
                <b class="up_title2">网络图片</b>|
                <b class="up_title3">图片搜索</b>
                <sub class="menu_tqb_c1"></sub>
                </p>
                <div class="up_content1" id="con_up_content_1">
                    <div id="swfUploadDiv"><input type="file" id="publisher_file" name="publisher_file" style="display:none;"></div>
                    <div id="normalUploadDiv" style="display:none;" >
                      <form id="normalUploadForm" method="post" action="ajax.php?mod=uploadify&code=image&type=normal&iitem={$img_item}&iitemid={$img_itemid}" enctype="multipart/form-data" target="imageUploadifyIframe">
                        <input type="file" id="normalUploadFile" name="topic" />
                        <input type="submit" value="上传" class="tul" />
                      </form>
                    </div>
                    <span id="uploading"></span>
                    <div class="viewImgDiv" id="viewImgDiv"></div>
                </div>
                <div class="up_content2" id="con_up_content_2" style="display:none;">
                    <p class="add">
					<input type="text" id="img_url"  value="请输入图片url地址" onclick="if(this.value=='请输入图片url地址'){this.value = '';}"/></p>
                    <p class="ok"><a href="javascript:void(0);" onclick="getUrlImage(img_url);" class="btnText" style="color:#fff;">确 定</a></p>
                    <span id="uploading_img" style="display:none"><img src='images/loading.gif'/>&nbsp;上传中，请稍候……</span>
                    <div class="viewImgDiv" id="viewUrlImgDiv"></div>
                </div>
                <div class="up_content3" id="con_up_content_3" style="display:none;">
                    <p class="add">
                      <input type="text" id="word" name="word" value="请输入关键字，如：世界末日" onclick="if(this.value=='请输入关键字，如：世界末日'){this.value = '';}"/></p>
					  <div class="ok"><a href="javascript:void(0);" onclick="searchImgByBaiDu();" class="btnText"  style="color:#fff;">搜索图片</a></div>
                    </p>
                    <div id="baidusearch_image_list"></div>
                </div>
            </div>
        </div>
	</div>
	</div>
	<!-- 图片区块 结束 -->
	<!--{/if}-->
    
	<!--{eval $ath_key = $h_key ? '_'.$h_key : '';}-->
	<div class="menu">
	<div class="menu_hp"><b onclick="showatuserw('i_already{$h_key}','{$h_key}','');return false;" class="menu_hpb_c" title="@朋友昵称提醒TA">朋友</b>
    <div class="menu_hpb">
      <span class="arrow-up"></span>   
      <span class="arrow-up-in"></span>
      <div class="menu_tb showusr">
      <div id="showatuser{$ath_key}" class="showatuser"></div>
      <sub class="menu_hpb_c1"></sub>
      </div>
    </div>
       </div>
	</div>

	<!--{if $this->Config['video_enable']}-->
	<div class="menu">
	<div class="menu_sp"><b class="menu_spb_c" title="支持新浪、优酷、搜狐、酷6、土豆视频的站内播放">视频</b>
	<div class="menu_spb" id="upload_ajax_video">
    <span class="arrow-up"></span>   
    <span class="arrow-up-in"></span>
	<div class="menu_tb" style="width:300px;">
    <span style="float:left; padding-left:10px; color:#666; width:270px;">支持如下视频的站内播放</span><div class="menu_spb_c1"></div></div>
	<p class="menu_p"><a href="http://video.sina.com.cn/" rel="nofollow" target="_blank">新浪</a>、<a href="http://www.youku.com/" rel="nofollow" target="_blank">优酷</a>、<a href="http://v.blog.sohu.com/" rel="nofollow" target="_blank">搜狐</a>、<a href="http://www.ku6.com/" rel="nofollow" target="_blank">酷6</a>、<a href="http://www.tudou.com/" rel="nofollow" target="_blank">土豆</a><br>请在浏览器中复制视频播放页的网址</p>
	  <div id="upload_video_list" class="menu_p" style="display:none;">
		<span id="return_ajax_video_title"></span>
		<span><img id="video_img" width="130" /></span>
		<p>
		<input id="videoid" type="hidden" name="video_id" />
		<span><a href="" onclick="DelVideo('videoid','video_ajax'); return false;" title="删除视频">删除视频</a></span>
		</p>
	  </div>
	  <div id="add_video" class="menu_p" style=" margin-bottom:6px; padding-top:0">
	  <iframe id="upload_video_frame" name="upload_video_frame" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank"></iframe>
	   <form action="ajax.php?mod=topic&code=dovideo" method="post" enctype="multipart/form-data" name="upload_video" id="upload_video" target="upload_video_frame">
		<input name="url" type="text" id="url" class="sc_r_t_a" style=" width:210px; display:inline;"/>
		<input type="submit" name="Submit" value="提 交" class="btnText" />
	   </form>
	  </div>
	</div></div>
	</div>
	<!--{/if}-->
    
    <!--{if $this->Config['music_enable']}-->
     <div class="menu">
		<div class="menu_x">
			<b class="menu_xb_c" title="分享音乐，支持站内播放">音乐</b>
			<div class="menu_xb">
                <span class="arrow-up"></span>   
                <span class="arrow-up-in"></span>
                <div class="menu_tb" style="width:290px;">
                <span style="float:left; padding-left:10px; color:#666;">请在下面输入歌曲名或歌手名字搜索</span>
                <sub class="menu_music_c1"></sub>
                </div>
             <div id="add_music" class="menu_m_s" style=" margin-bottom:6px; padding:15px 10px 0; float:left;">
              <form action="javascript:void(0);" method="post" enctype="multipart/form-data" name="upload_music" id="upload_music">
                  <input name="url" type="text" id="music_name" class="sc_r_t_a" style=" width:210px;">
                  <input type="submit" name="Submit" value="搜 索" class="btnText" onclick="music_serach();">
              </form>
             </div>
             <p class="menu_p" style="padding:0 10px;">mp3等后缀的网址请直接粘贴到上面的发布框中</p>
             <div id="music_list" class="menu_m_l"></div>
		   </div>
		</div>
	</div>    
    <!--{/if}-->

   <!--{if $this->Config['word_type_enable']}-->
   <div class="menu">
      <div class="menu_a">
        <b class="menu_a_c"><a href="javascript:void(0);" title="给文字加上特效" style="color:#666;">格式</a></b>
        <div class="pull" style="display:none;">
                        <span class="arrow-up"></span>   
                <span class="arrow-up-in"></span>
            <sub class="menu_a_c1"></sub>
            <div class="menu_hb">
                <span onclick="setFont('b');return false;" class="menu_hbb_c" title="先在输入框中选择要加粗的文字">粗体</span>
            </div>
            <div class="menu_hc">
              <span onclick="getColorMenu();return false;" class="menu_hcb_c" title="先在输入框中选择要加颜色的文字">颜色</span>
              <sub class="menu_color_c1"></sub>
              <div class="menu_c_b" id="color_menu"></div>
            </div>
            <div class="menu_hy">
              <span class="menu_hyb_c" title="点击打开引用内容输入框">引用</span>
              <div class="menu_q_b">
                              <span class="arrow-up"></span>   
                <span class="arrow-up-in"></span>
                <div class="menu_q_d">
                  <div class="menu_qd">
                    <span style="float:left; padding-left:5px; color:#666;">请输入要引用的内容：</span>
                    <sub class="menu_quote_c1"></sub>
                  </div>
                  <span>
                    <textarea id="quote"></textarea>
                  </span>
                  <span>
                    <input class="btnText" type="button" value="提交" onclick="insertQuote(quote,'quote');" />
                  </span>
                </div>
              </div>
            </div>
            <div class="menu_hm">
                <span class="menu_hmb_c" title="点击打开代码内容输入框">代码</span>
              <div class="menu_mc_b">
                              <span class="arrow-up"></span>   
                <span class="arrow-up-in"></span>
                <div class="menu_mc_d">
                  <div class="menu_mc">
                    <span style="float:left; padding-left:5px;color:#666;">请输入要引用的代码：</span>
                    <sub class="menu_code_c1"></sub>
                  </div>
                  <span>
                    <textarea id="code"></textarea>
                  </span>
                  <span>
                    <input class="btnText" type="button" value="提交" onclick="insertQuote(code,'code');"/>
                  </span>
                </div>
              </div>
            </div>
          </div>
        </div>
     </div>    
     <!--{/if}-->

	<div class="menu">
	  <div class="menu_m">
		<b class="menu_m_c" ><a href="javascript:void(0);" style="color:#666;">更多</a></b>
        <div class="pull_down" style="display:none;">
            <span class="arrow-up"></span>   
            <span class="arrow-up-in"></span>
            <sub class="menu_m_c1"></sub>
            <!-- 文件区块 开始 -->
            <!--{eval if(($this->Config['attach_enable'] && $this->Module!='qun') || ($this->Config['qun_attach_enable'] && $this->Module=='qun')) $allow_attach = 1; else $allow_attach = 0 }-->
            <!--{if $allow_attach}-->
            <!-- JS引用 开始 -->
            <!--{eval $attach_uploadify_topic = array();}-->
            <!--{eval $attach_uploadify_from = 'topic_publish';}-->
            <!--{eval $attach_uploadify_only_js = 1;}-->
            <!--{eval $attach_num = min(max(1,(int)$this->Config['attach_files_limit']),50);}-->
            <!--{eval $attach_size = min(max(1,(int)$this->Config['attach_size_limit']),51200);}-->
            <!--{eval $attach_size = $attach_size >= 1024 ? round(($attach_size/1024),1).'M' : $attach_size.'KB';}-->
            {template "attach_uploadify.inc"}
            <!-- JS引用 结束 -->            	
            <div class="menu_fj" ><b class="menu_fjb_c" title="上传本地附件">附件</b>
                <div class="menu_fjb">
                <span class="arrow-up"></span>   
                <span class="arrow-up-in"></span>
                    <div class="menu_fb">
                       <span style="float:left; padding-left:10px;">请选择上传的附件</span>
                    </div>
                    <div class="menu_pi insertImgDiv" id="insertAttachDiv">
                        <div id="swfUploadDivAttach">
                        <input type="file" id="publisher_file_attach" name="publisher_file" style="display:none;" />
                        </div>
                        <iframe id="attachUploadifyIframe" name="attachUploadifyIframe" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank" style="display:none;"></iframe>
                        <div id="normalAttachUploadDiv" style="display:none;">
                            <form id="normalAttachUploadForm" method="post" action="ajax.php?mod=uploadattach&code=attach&type=normal&aitem={$attach_item}&aitemid={$attach_itemid}" enctype="multipart/form-data" target="attachUploadifyIframe" onsubmit="return normalAttachUploadFormSubmit()">
                                <input type="file" id="normalAttachUploadFile" name="topic" />
                                <input type="submit" value="上传" class="tul" />
                            </form>
                        </div>
                        <i class="menu_fjb_c1"><img src="images/imgdel.gif" title="关闭" /></i>
                        <em>
                            1、如不能上传文件，请<a href="javascript:;" onclick="attachUploadifyModuleSwitch();">点击这里</a>用<span id="uploadDescModuleSpanAttach">普通</span>模式上传.<br />
                            2、最多可上传{$attach_num}个文件，单个文件大小不超过{$attach_size}。
                        </em>
                        <span id="uploadingAttach"></span>
                        <div class="viewImgDiv" id="viewAttachDiv"></div>
                    </div>
                    <div id="uploadifyQueueDivAttach" style="display:none;"></div>		
                </div>
            </div>
            <!--{/if}-->
            <!-- 文件区块 结束 -->
            <!--{if $this->Config['tag_enable']}-->
            <div class="menu_ht" id="button_{MEMBER_ID}">
              <span onclick="get_tag_choose({MEMBER_ID},'my_tag','{$h_key}');return false;"class="menu_htb_c" title="点击添加话题，方便归类查看">话题</span>
              <div class="menu_htb">
                              <span class="arrow-up"></span>   
                <span class="arrow-up-in"></span>
                  <div id="{$h_key}tag_{MEMBER_ID}"></div>
              </div>
            </div>  
            <!--{/if}-->
            <!--{if $this->Config['vote_open']}-->
            <div class="menu_vs"><b class="menu_vsb_c" title="发起或选择已有投票">投票</b>
                <div class="menu_vsb">
                                <span class="arrow-up"></span>   
                <span class="arrow-up-in"></span>
                    <div class="menu_vsbox">
                        <p class="stitle">
                        <b id="vote_content1" class="vhover" onclick="setTab('vote_content',1,4);getVoteAvtivityFromIndex('vote_publish', 'con_vote_content_1');">创建文字投票</b>
                        <b id="vote_content4" onclick="setTab('vote_content',4,4);getVoteAvtivityFromIndex('pic_vote_publish', 'con_vote_content_4','pic');">创建图片投票</b>
                        <b id="vote_content2" onclick="setTab('vote_content',2,4);getMyVoteList(1);">我发起的</b>
                        <b id="vote_content3" onclick="setTab('vote_content',3,4);getMyJoinList(1);">我参与的</b>
                        <sub class="menu_vsb_c1"></sub>
                        </p>
                        
                        <div class="vcontent" id="con_vote_content_1">
                        <p>正在加载...</p>
                        </div>
                        <div class="vcontent vote_conLi" id="con_vote_content_2" style="display:none;">
                        <p>正在加载...</p>
                        </div>
                        <div class="vcontent vote_conLi" id="con_vote_content_3" style="display:none;">
                        <p>正在加载...</p>
                        </div>	
                        <div class="vcontent vote_conLi" id="con_vote_content_4" style="display:none;">
                        <p>正在加载...</p>
                        </div>	
                    </div>
                </div>
            </div> 
            <!--{/if}-->
            
            <!--{if $this->Config['event_open']}-->
            <div class="menu_hd"><b class="menu_hdb_c" title="发起或选择已有活动">活动</b>
                <div class="menu_hdb">
                                <span class="arrow-up"></span>   
                <span class="arrow-up-in"></span>
                    <div class="menu_hdbox">
                    <p class="stitle">
                    <b id="event_content1" class="vhover" onclick="setTab1('event_content',1,3)">发起新活动</b>
                    <b id="event_content2" onclick="setTab1('event_content',2,3);getMyEventList(1);">我发起的</b>
                    <b id="event_content3" onclick="setTab1('event_content',3,3);getJoinEventList(1);">我参与的</b>
                    <sub class="menu_hdb_c1"></sub>
                    </p>
                    
                    <div class="vcontent" id="con_event_content_1">
                    <p>正在加载...</p>
                    </div>
                    <div class="vcontent vote_conLi" id="con_event_content_2" style="display:none;">
                    <p>正在加载...</p>
                    </div>
                    <div class="vcontent vote_conLi" id="con_event_content_3" style="display:none;">
                    <p>正在加载...</p>
                    </div>                   
                    </div>
                </div>
            </div> 
            <!--{/if}-->
            <!--{if $this->Config['qun_setting']['qun_open']}-->
            <div class="menu_wq">
                <b class="menu_wqb_c" title="将内容发布到我的微群">$this->Config['changeword']["weiqun"] </b>
                <div class="menu_wqb">
                <span class="arrow-up"></span>   
                <span class="arrow-up-in"></span>
                    <div class="menu_wqbox" style="width:210px;">
                        <div class="menu_tb" style="width:210px;">
                            <span style="float:left; padding-left:10px;">选择你要发布到的{$this->Config['changeword']['weiqun']}</span>
                            <sub class="menu_wqb_c1"></sub>
                        </div>
                        <div class="wcontent" id="wcontent_wp"></div>
                    </div>
                </div>
            </div>       
            <!--{/if}-->
        </div>
		
	  </div>
	</div>
<!--{hook/global_publish_extra1}-->
<!--{else}-->
<div class="box_3ajax">
<!--{/if}-->
</div>


<!--{eval $channel_must = $this->Channel_enable && $this->Config['channel_enable'] && $this->Config['channel_must'] ? 1 : 0;}-->
<div class="sendBtn">
<!--{eval if ($this->Get[mod] == 'tag') $type = 'tagview' ;elseif ($this->Get[mod] == 'member') $type = 'tohome';elseif ($this->Get[mod] == 'vote') $type='vote';elseif ($this->Get[mod] == 'live') $type='live';elseif ($this->Get[mod] == 'talk') $type='talk';elseif ($this->Get[mod] == 'fenlei') $type='fenlei';elseif ($this->Get[mod] == 'event') $type='event';elseif ($this->Get[mod] == 'reward') $type='reward'; else $type = $params[code];}-->
	<!--{eval $type = $type ? $type : $this->Code;}-->
	<!--{if $this->Config['seccode_publish'] && $this->yxm_title}-->
	<input type="hidden" id="yxm_topicpub{$h_key}" onclick="publishSubmit('publishSubmit{$h_key}','indexBtn','i_already{$h_key}','totid{$h_key}','{$type}','topic_type{$h_key}','','',$('#mapp_item{$h_key}').val(),$('#mapp_item_id{$h_key}').val(),$('#xiami_id').val(),$('#touid{$h_key}').val(),{$channel_must},$('#cverify').val());return false;">
	<!--{/if}-->
    
	<!--{if !($this->Code=='do_first_topic')}--><!--判断是否是在用户注册引导页-->
	<input type="button" class="indexBtn" id="publishSubmit{$h_key}" title="按Ctrl+Enter快捷发布" value="发 布"/>
	<!--{/if}-->
	<!--这边的判断主要是为了在应用中使用微博发布框-->
	<!--{eval $topic_allow_syncd = true;}-->
	<!--#if NEDU#-->
	<!--{if defined('NEDU_MOYO')}-->
		<!--{eval nlogic('feeds.app.jsg')->topic_publish_action_allowed('syncd', $topic_allow_syncd)}-->
	<!--{/if}-->
	<!--#endif#-->
	<!--{if in_array($this->Get[mod], array('qun','live','talk','event','vote','fenlei','reward')) || $this->Get[type] == 'ask' || !$topic_allow_syncd}-->
	<!--{eval $topic_type_value = $this->Get[type] == 'ask' ? $this->Get[item] : $this->Get[mod];}-->
		<!--{eval $topic_allow_forward = true;}-->
		<!--#if NEDU#-->
		<!--{if defined('NEDU_MOYO')}-->
			<!--{eval nlogic('feeds.app.jsg')->topic_publish_action_allowed('forward', $topic_allow_forward)}-->
		<!--{/if}-->
		<!--#endif#-->
		<!--{if $topic_allow_forward}-->
		<div class="box_4_open">
		<b class="box_4_open_span" style="padding:0;"> <label><input id="chk_toweibo{$h_key}" type="checkbox" checked="checked" onclick="selectAppTopicType(this.id, {toid:'topic_type{$h_key}', defTopicType:'{$topic_type_value}'})">转发给粉丝</label></b>
		</div>
		<!--{/if}-->
	    <!--{else}-->
	    <!--{if $this->Config['account_on_off']}-->
		
		<div class="box_4_open" id="weibo_syn_wp">
		<b class="box_4_open_span" title="将内容同步发到高亮按钮对应平台">同步到：</b>
		<sub class="box_4_open_span_c1"></sub>
		<!--{if $this->Config[sina_enable] && sina_weibo_init()}-->
		<span>{eval echo sina_weibo_syn();}</span>
		<!--{/if}-->
		<!--{if $this->Config[qqwb_enable] && qqwb_init()}-->
		<span>{eval echo qqwb_syn();}</span>
		<!--{/if}-->
		<!--{if $this->Config[kaixin_enable] && kaixin_init()}-->
		<span>{eval echo kaixin_syn_html();}</span>
		<!--{/if}-->
		<!--{if $this->Config[renren_enable] && renren_init()}-->
		<span>{eval echo renren_syn_html();}</span>
		<!--{/if}-->
		</div>
		<!--{/if}-->
	<!--{/if}-->
</div>

</div>



<!--{if $this->Config['seccode_publish'] && $this->yxm_title}-->
<span id="yxm_pub_button{$h_key}" onclick="YXM_popBox(this,'topic,{$h_key}','{$this->yxm_title}');" style="margin-left:150px;height:1px;">&nbsp;</span>
<!--{/if}-->
</div>
</div>
<script type="text/javascript">
		var dfpstr = '{$content_dstr}';
        //如果是群、并且没有设置转发给粉丝的话、将topic_type{$h_key} 设置成qun；chk_toweibo{$h_key} 的checked设置成''；
        <!--{if $this->Get['mod'] == 'qun' && !$this->Config['qun_setting']['qun_topic_to_weibo']}-->
        setQun();
        <!--{/if}-->
        function setQun(){
            $("#chk_toweibo{$h_key}").removeAttr('checked');
            $("#topic_type{$h_key}").val('qun');
        }
		$("#i_already{$h_key}").bind('focus', function(){
			if($('#tochannel').length>0){$('#send_follow').hide();$('#tochannel').show();}
			$('.sendInsert').addClass('sendInsertfocus');			
			//$('.sendInsert a').css('color','#333');
		    var i=0;
		   // setTimeout(function(){i+=1; $('#sendTig').css('visibility', 'hidden'); },5000);
		});
		$(".sendInsert *").bind('click', function(){
			$('.sendInsert').addClass('sendInsertfocus');del_instr(0);
			//$('.sendInsert a').css('color','#333');
		});
		
//		$("#i_already{$h_key}").bind('blur', function(){
//			$('.sendInsert').removeClass('sendInsertfocus');
//			$('.sendInsert a').css('color','#999');
//		});

		
		<!--{if $this->Config['seccode_publish'] && $this->yxm_title}-->
		$("#publishSubmit{$h_key}").bind('click',function() {
			YXM_pubtopic('i_already{$h_key}','{$h_key}','topic_type{$h_key}','',$('#mapp_item_id{$h_key}').val(),{$channel_must});return false;
		});
		<!--{else}-->
		$("#publishSubmit{$h_key}").bind('click',function() {
			publishSubmit('publishSubmit{$h_key}','indexBtn','i_already{$h_key}','totid{$h_key}','{$type}','topic_type{$h_key}','','',$('#mapp_item{$h_key}').val(),
			$('#mapp_item_id{$h_key}').val(),$('#xiami_id').val(),$('#touid{$h_key}').val(),{$channel_must},$('#cverify').val());
			return false;
		});
		<!--{/if}-->
		
		$(document).ready(function(){
			initAiInput('i_already{$h_key}');$('#i_already{$h_key}').setCaret();
			checkWord('{conf topic_input_length}','i_already{$h_key}','wordCheck{$h_key}');
			$("#i_already{$h_key}").autoTextarea({maxHeight:220});
			get_publish_str("#i_already{$h_key}",publish_in_str,'{$content_dstr}','{$not_indestr}');
		});
		
		//发布到频道文字闪动效果
        function shake(ele,cls,times){
	        var i = 0, t = false, o = ele.attr("class")+" ", c = "", times = times||2;
	        if(t) return;
	        t= setInterval(function(){
		    i++;
		    c = i%2 ? o+cls : o;
		    ele.attr("class",c);
		    if(i==2*times){
			  clearInterval(t);
			  ele.addClass(cls);
		    }
	        },200);
        };
		var pint = null;
		function get_publish_str(obj,arr_str,str,aj){
			var count_in = arr_str.length;
			pint= setInterval(function(){if(count_in > 1 && str && !aj){var randnum_in = (1+Math.random()*(count_in-1)).toFixed(0)-1;dfpstr=arr_str[randnum_in];$(obj).val(dfpstr);}},10000);
		}
		function del_instr(c){
			clearInterval(pint);if($("#i_already{$h_key}").val()==dfpstr){if(c){$("#i_already{$h_key}").val('{$content}')}else{$("#i_already{$h_key}").val('');}};
		}
	    $("#i_already{$h_key}").bind({
		click:function(){
			if($('#t_pb').length>0){shake($("#t_pb"),"select_shake",2);}del_instr(1);
			return false;
		}
	    });

</script>

